/* 重置默认样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow-x: hidden;
}

/* 全局布局 */
.layout {
  min-height: 100vh;
  width: 100vw;
  position: relative;
  overflow-x: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  flex-direction: column;
}

/* 背景动画 */
.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  animation: backgroundShift 15s ease-in-out infinite;
  z-index: 0;
}

@keyframes backgroundShift {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* 头部样式 */
.header {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
  padding: 0 max(20px, 5%);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
  width: 100%;
  height: 64px;
}

.logo-container {
  display: flex;
  align-items: center;
  margin-right: min(50px, 5vw);
  flex-shrink: 0;
}

.logo-circle {
  width: 40px;
  height: 40px;
  background: linear-gradient(45deg, #00f2fe, #4facfe);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.logo-text {
  color: white;
  font-weight: bold;
  font-size: 14px;
}

.site-title {
  color: white !important;
  margin: 16px 0 !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

/* 菜单样式 */
.main-menu {
  flex: 1;
  border: none !important;
  display: flex;
  justify-content: center;
  width: auto !important;
}

.ant-menu-overflow {
  justify-content: center;
}

.ant-menu-item {
  color: rgba(255, 255, 255, 0.8) !important;
  transition: all 0.3s ease !important;
  padding: 0 min(20px, 2vw) !important;
}

.ant-menu-item:hover {
  color: white !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

.ant-menu-item-selected {
  color: white !important;
  background: rgba(255, 255, 255, 0.2) !important;
}

/* 主要内容区域 */
.main-content {
  flex: 1;
  padding: min(50px, 5vh) min(50px, 5vw);
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.content-card {
  background: rgba(255, 255, 255, 0.9);
  padding: min(24px, 3vw);
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.content-card:hover {
  transform: translateY(-5px);
}

/* 工具容器样式 */
.tool-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: min(20px, 2vw);
}

.tool-container h2 {
  color: #4a5568;
  margin-bottom: min(24px, 3vh);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

/* 上传区域自适应 */
.ant-upload-wrapper {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.ant-upload {
  width: 100% !important;
  height: auto !important;
  min-height: 150px;
  background: rgba(255, 255, 255, 0.8);
  border: 2px dashed rgba(0, 242, 254, 0.5);
  border-radius: 12px;
  transition: all 0.3s ease;
  display: flex !important;
  justify-content: center;
  align-items: center;
  padding: min(20px, 2vw);
}

.ant-upload:hover {
  border-color: #00f2fe;
  background: rgba(255, 255, 255, 0.9);
}

/* 按钮样式 */
.ant-btn {
  border-radius: 8px;
  transition: all 0.3s ease;
  padding: 8px min(24px, 3vw);
  height: auto;
  font-size: clamp(14px, 1.5vw, 16px);
}

.ant-btn-primary {
  background: linear-gradient(45deg, #00f2fe, #4facfe);
  border: none;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.ant-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.4);
}

/* 页脚样式 */
.footer {
  text-align: center;
  padding: min(20px, 2vh);
  color: rgba(255, 255, 255, 0.8);
  position: relative;
  z-index: 1;
  width: 100%;
}

/* 响应式设计 */
@media screen and (max-width: 1200px) {
  .content-card {
    margin: 0 min(20px, 2vw);
  }
}

@media screen and (max-width: 768px) {
  .header {
    height: auto;
    padding: 10px min(20px, 5vw);
    flex-direction: column;
  }
  
  .logo-container {
    margin: 0 0 10px 0;
    justify-content: center;
  }
  
  .main-menu {
    width: 100% !important;
  }

  .ant-menu {
    justify-content: flex-start !important;
    overflow-x: auto;
  }
  
  .ant-menu::-webkit-scrollbar {
    display: none;
  }
  
  .content-card {
    margin: 0;
    border-radius: 0;
  }
  
  .main-content {
    padding: min(20px, 3vh) 0;
  }
}

/* 滑块样式 */
.ant-slider {
  margin: min(20px, 2vh) auto;
  max-width: 300px;
  width: 90%;
}

.ant-slider-track {
  background: linear-gradient(45deg, #00f2fe, #4facfe) !important;
}

.ant-slider-handle {
  border: 2px solid #00f2fe !important;
  background: white !important;
}

/* 图片预览容器 */
.preview-container {
  width: 100%;
  max-width: 800px;
  margin: min(20px, 2vh) auto;
  padding: min(20px, 2vw);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.preview-container img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* 加载状态 */
.loading-container {
  width: 100%;
  min-height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 文字响应式 */
p {
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.6;
}
